package com.zisuyi.uilibrary.module.activty.invite

import com.weilele.mvvm.base.helper.createStatusLiveData
import com.zisuyi.game.sdk.net.GameModel
import com.zisuyi.game.sdk.net.bean.InviteBean
import com.zisuyi.game.sdk.net.bean.req.InviteReq
import com.zisuyi.uilibrary.base.BaseUiViewModel

class InviteViewModel : BaseUiViewModel() {
    val inviteData = createStatusLiveData<InviteBean>()

    fun inviteCode(code: String?) {
        if (code.isNullOrBlank()) {
            return
        }
        inviteData.retrofitGame {
            GameModel.inviteCode(InviteReq(code))
        }
    }
}